package com.itnoob.logger.impl;

import com.itnoob.log.Logger;
import com.itnoob.logger.AbstractLogger;

import java.time.LocalDateTime;

/**
 * 格式化的日志输出
 * @author zhoujun
 * @date 2025/3/20 22:36
 */
public class FormattedoggerImpl extends AbstractLogger {

    public FormattedoggerImpl(Logger logger) {
        super(logger);
    }

    @Override
    public void info(String message) {
        logger.log("[INFO] [" + LocalDateTime.now() +  "] " + message);
    }

    @Override
    public void warn(String message) {
        logger.log("[WARN] [" + LocalDateTime.now() +  "] " + message);
    }

    @Override
    public void error(String message) {
        logger.log("[ERROR] [" + LocalDateTime.now() +  "] " + message);
    }
}
